<?php
//商品管理
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/product',
    'middleware' => ['response', 'auth'],
], function () {
    //spu
    Route::post('/add_spu', "SpuController@addSpu")->middleware('transaction');
    Route::delete('/del_spu', "SpuController@delSpu")->middleware('transaction');;
    Route::put('/edit_spu', "SpuController@editSpu")->middleware('transaction');;
    Route::put('/edit_spu_status', "SpuController@editSpuStatus");
    Route::get('/spu_list', "SpuController@getSpuList");
    Route::get('/spu_info', "SpuController@getSpuInfo");
});

//尺寸管理
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/size',
    'middleware' => ['response', 'auth'],
], function () {
    Route::post('/add', "SizeController@addSize");
    Route::delete('/del', "SizeController@delSize");
    Route::put('/edit', "SizeController@editSize");
    Route::get('/list', "SizeController@getSizeList");
    Route::get('/info', "SizeController@getSizeInfo");

});

//栏目管理
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/category',
    'middleware' => ['response', 'auth'],
], function () {
    Route::post('/add', "CategoryController@addCategory");
    Route::delete('/del', "CategoryController@delCategory");
    Route::put('/edit', "CategoryController@editCategory");
    Route::get('/list', "CategoryController@getCategoryList");
    Route::get('/info', "CategoryController@getCategoryInfo");
    Route::get('/down_list', "CategoryController@getCategoryDownList");

});

//品牌管理
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/brand',
    'middleware' => ['response', 'auth'],
], function () {
    Route::post('/add', "BrandController@addBrand");
    Route::delete('/del', "BrandController@delBrand");
    Route::put('/edit', "BrandController@editBrand");
    Route::get('/list', "BrandController@getBrandList");
    Route::get('/down_list', "BrandController@getBrandDownList");
    Route::get('/info', "BrandController@getBrandInfo");
});

//店铺管理
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/shop',
    'middleware' => ['response', 'auth'],
], function () {
    Route::post('/add', "BrandController@addBrand");
    Route::delete('/del', "BrandController@delBrand");
    Route::put('/edit', "BrandController@editBrand");
    Route::get('/list', "BrandController@getBrandList");
    Route::get('/info', "BrandController@getBrandInfo");
});

//参数类型管理
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/system_type',
    'middleware' => ['response', 'auth'],
], function () {
    Route::post('/add', "SystemTypeController@addSystemType");
    Route::delete('/del', "SystemTypeController@delSystemType");
    Route::put('/edit', "SystemTypeController@editSystemType");
    Route::get('/list', "SystemTypeController@getSystemTypeList");
    Route::get('/info', "SystemTypeController@getSystemTypeInfo");
});

//轮播图
Route::group([
    'namespace' => 'App\Http\Controllers\ProductCenter',
    'prefix' => 'product/carousel',
    'middleware' => ['response', 'auth'],
], function () {
    Route::post('/add', "CarouselController@addCarousel");
    Route::delete('/del', "CarouselController@delCarousel");
    Route::put('/edit', "CarouselController@editCarousel");
    Route::get('/list', "CarouselController@getCarouselList");
    Route::get('/info', "CarouselController@getCarouselInfo");
});
